package com.bub.pay.outer.redis.redis;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.connection.MessageListener;

import com.bub.pay.framework.common.async.ExceptionHandlingAsyncTaskExecutor;
import com.bub.pay.framework.redis.RedisClient;

import javax.annotation.Resource;

/**
 * 
 * @ClassName: RedisCallBackListener
 * @Description: redis监听
 * @author Leo
 * @version V1.0
 */
public class RedisCallBackListener implements MessageListener {

	/** Logger */
	private static final Logger log = LoggerFactory.getLogger(RedisCallBackListener.class);

	@Resource
	private RedisClient redisClient;

	@Resource
	private ExceptionHandlingAsyncTaskExecutor taskExecutor;

	@Override
	public void onMessage(Message message, byte[] pattern) {
		if (null == message) {
			return;
		}
		Object obj = redisClient.getRedisTemplate().getDefaultSerializer().deserialize(message.getBody());
		
	}

}
